package com.etlmaster.executor;

import java.text.SimpleDateFormat;
import java.util.UUID;

public class JobMeta implements Cloneable {

	private String id;

	private String name;

	private String jobBatchNo;

	private String teamCode;

	private String logFile;

	private String isDebug;

	private String seesionId = UUID.randomUUID().toString();

	public JobMeta(String id, String name, String jobBatchNo, String teamCode,
			String logFile, String isDebug) {
		this.id = id;
		this.name = name;
		if (jobBatchNo == null || jobBatchNo.length() == 0) {
			jobBatchNo = new SimpleDateFormat("yyyyMMdd").format(System
					.currentTimeMillis());
		} else {
			this.jobBatchNo = jobBatchNo;
		}
		if (teamCode == null || teamCode.length() == 0) {
			teamCode = "";
		} else {
			this.teamCode = teamCode;
		}
		if (logFile == null || logFile.length() == 0) {
			this.logFile = "";
		} else {
			this.logFile = logFile;
		}
		if (isDebug == null || isDebug.length() == 0) {
			this.isDebug = "";
		} else {
			this.isDebug = isDebug;
		}
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getJobBatchNo() {
		return jobBatchNo;
	}

	public void setJobBatchNo(String jobBatchNo) {
		this.jobBatchNo = jobBatchNo;
	}

	public String getTeamCode() {
		return teamCode;
	}

	public void setTeamCode(String teamCode) {
		this.teamCode = teamCode;
	}

	public String getSeesionId() {
		return seesionId;
	}
	public void setSeesionId(String sessionId) {
		this.seesionId=sessionId;
	}

	public String getLogFile() {
		return logFile;
	}

	public void setLogFile(String logFile) {
		this.logFile = logFile;
	}

	public String getIsDebug() {
		return isDebug;
	}

	public void setIsDebug(String isDebug) {
		this.isDebug = isDebug;
	}

	protected Object clone() throws CloneNotSupportedException {

		JobMeta metaInstance = (JobMeta) super.clone();

		return metaInstance;

	}
}
